package com.example.project.entity;

import lombok.Data;

@Data
public class ResponseInfo {
    Integer code;
    String msg;
    Object data;

    static public ResponseInfo fail(Integer code, String msg) {
        ResponseInfo res=new ResponseInfo();
        res.setCode(code);
        res.setMsg(msg);
        return res;
    }

    static public ResponseInfo success(Object data) {
        ResponseInfo res=new ResponseInfo();
        res.setCode(200);
        res.setData(data);
        return res;
    }

}
